import Layout from '@/views/layout/index'

const customerRouter = {
    path: '/customer',
    name: 'customer',
    component: Layout,
    meta: {
        title: '潜在顾客',
        icon: 'iconfont icon-qiankeguanli'
    },
    redirect: "/customer/manage",
    children: [{
        path: 'manage',
        name: 'customerManage',
        component: () => import('@/views/customer/manage'),
        meta: {
            title: '潜在顾客',
            icon: 'iconfont icon-qiankeguanli',
            api: ['customer'],
            authority: ['list'],
        },
        checkedList: [],
        rights: [{
                value: 'list',
                label: '列表'
            },{
                value: 'own',
                label: '只看自己'
            },{
                value: 'create',
                label: '添加'
            },{
                value: 'details',
                label: '详情'
            },{
                value: 'edit',
                label: '编辑'
            },{
                value: 'delete',
                label: '删除'
            },{
                value: 'runaway',
                label: '流失'
            },{
                value: 'allot',
                label: '分派'
            },{
                value: 'add_opportunity',
                label: '生成商机'
            }]
    },{
        path: 'details',
        name: 'customerDetails',
        component: () => import('@/views/customer/details'),
        hidden: true,
        meta: {
            title: '顾客详情',
            api: ['customer'],
            authority: ['create','edit','details'],
        }
    },{
        path: 'info',
        name: 'customerInfo',
        component: () => import('@/views/customer/info'),
        hidden: true,
        meta: {
            title: '潜客信息',
            api: ['customer'],
            authority: ['create','edit','details']
        }
    },{
        path: 'source',
        name: 'sourceManage',
        component: () => import('@/views/customer/source'),
        meta: {
            title: '报名渠道',
            api: ['source'],
            authority: ['list'],
        },
        checkedList: [],
        rights: [{
                value: 'list',
                label: '列表'
            },{
                value: 'create',
                label: '添加'
            },{
                value: 'details',
                label: '详情'
            },{
                value: 'edit',
                label: '编辑'
            },{
                value: 'delete',
                label: '删除'
            }]
    },{
        path: 'sourceDetails',
        name: 'sourceDetails',
        component: () => import('@/views/customer/sourceDetails'),
        hidden:true,
        meta: {
            title: '报名渠道详情',
            api: ['source'],
            authority: ['create','edit','details'],
        }
    }]
}

export default customerRouter
